<?php
require_once'Common/database.php';
require_once'Common/values.php';

echo '<p><h3>Recycle items</h3>';
#echo "<br>Returned : <b>", mysql_affected_rows() ,"</b> Rows";
echo '<table><tr><td>ID</td><td>Branch</td><td>Department</td><td>Type of Equpment</td><td>Serial Number</td><td>Checked by</td><td>Date Checked</td><td>Reason</td><td>Action</td><td>Faulty</td><td>Status</td></tr>';
$query=mysql_query("SELECT * FROM tblInventory WHERE Status LIKE '% scrap'");

$i=0;
while($row = mysql_fetch_array($query))
  {
echo '<form action="inventory/recycle1.php" Method="POST"><tr id="row'.$i.'" onMouseOver="row'.$i.'.style.backgroundColor=\'#F0F0F0\';" onmouseout="row'.$i.'.style.backgroundColor=\'#6495ED\';" onclick="location.href=\'index.php?m=i&p=iupdate&f2='.$row['key'].' \'"><td><input size="3" type="hidden" name="key" Value="'.$row['key'].'">'.$row['key'].'</td><td>'.$row['Branch'].'</a></td><td>'.$row['Department'].'</td><td>'.$row['Type'].'</td><td>'.$row['serial'].'</td><td>'.$row['CheckedBy'].'</td><td>'.$row['DateChecked'].'</td><td>'.$row['Reason'].'</td><td>'.$row['Action'].'</td><td>'.$row['Faulty'].'</td><td>'.$row['Status'].'</td><td><input type="submit" Value="Recycle"></tr></form>';
  $i=$i+1;

  }
  echo '</table>';
?>
